\(\int \log ^2(c (d+e x)) \, dx\) [3]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 10, antiderivative size = 41 \[ \int \log ^2(c (d+e x)) \, dx=2 x-\frac {2 (d+e x) \log (c (d+e x))}{e}+\frac {(d+e x) \log ^2(c (d+e x))}{e} \]

[Out]

2*x-2*(e*x+d)*ln(c*(e*x+d))/e+(e*x+d)*ln(c*(e*x+d))^2/e

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {2436, 2333, 2332} \[ \int \log ^2(c (d+e x)) \, dx=\frac {(d+e x) \log ^2(c (d+e x))}{e}-\frac {2 (d+e x) \log (c (d+e x))}{e}+2 x \]

[In]

Int[Log[c*(d + e*x)]^2,x]

[Out]

2*x - (2*(d + e*x)*Log[c*(d + e*x)])/e + ((d + e*x)*Log[c*(d + e*x)]^2)/e

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2436

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \log ^2(c x) \, dx,x,d+e x\right )}{e} \\ & = \frac {(d+e x) \log ^2(c (d+e x))}{e}-\frac {2 \text {Subst}(\int \log (c x) \, dx,x,d+e x)}{e} \\ & = 2 x-\frac {2 (d+e x) \log (c (d+e x))}{e}+\frac {(d+e x) \log ^2(c (d+e x))}{e} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.98 \[ \int \log ^2(c (d+e x)) \, dx=\frac {2 e x-2 (d+e x) \log (c (d+e x))+(d+e x) \log ^2(c (d+e x))}{e} \]

[In]

Integrate[Log[c*(d + e*x)]^2,x]

[Out]

(2*e*x - 2*(d + e*x)*Log[c*(d + e*x)] + (d + e*x)*Log[c*(d + e*x)]^2)/e

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.15

method result size
risch \(\frac {\left (e x +d \right ) \ln \left (c \left (e x +d \right )\right )^{2}}{e}-2 x \ln \left (c \left (e x +d \right )\right )+2 x -\frac {2 d \ln \left (e x +d \right )}{e}\) \(47\)
derivativedivides \(\frac {\left (c e x +c d \right ) \ln \left (c e x +c d \right )^{2}-2 \left (c e x +c d \right ) \ln \left (c e x +c d \right )+2 c e x +2 c d}{c e}\) \(57\)
default \(\frac {\left (c e x +c d \right ) \ln \left (c e x +c d \right )^{2}-2 \left (c e x +c d \right ) \ln \left (c e x +c d \right )+2 c e x +2 c d}{c e}\) \(57\)
norman \(x \ln \left (c \left (e x +d \right )\right )^{2}+\frac {d \ln \left (c \left (e x +d \right )\right )^{2}}{e}+2 x -2 x \ln \left (c \left (e x +d \right )\right )-\frac {2 d \ln \left (c \left (e x +d \right )\right )}{e}\) \(57\)
parallelrisch \(\frac {x \ln \left (c \left (e x +d \right )\right )^{2} e -2 \ln \left (c \left (e x +d \right )\right ) x e +\ln \left (c \left (e x +d \right )\right )^{2} d +2 e x -2 d \ln \left (c \left (e x +d \right )\right )-2 d}{e}\) \(61\)

[In]

int(ln(c*(e*x+d))^2,x,method=_RETURNVERBOSE)

[Out]

(e*x+d)*ln(c*(e*x+d))^2/e-2*x*ln(c*(e*x+d))+2*x-2*d/e*ln(e*x+d)

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.02 \[ \int \log ^2(c (d+e x)) \, dx=\frac {{\left (e x + d\right )} \log \left (c e x + c d\right )^{2} + 2 \, e x - 2 \, {\left (e x + d\right )} \log \left (c e x + c d\right )}{e} \]

[In]

integrate(log(c*(e*x+d))^2,x, algorithm="fricas")

[Out]

((e*x + d)*log(c*e*x + c*d)^2 + 2*e*x - 2*(e*x + d)*log(c*e*x + c*d))/e

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.12 \[ \int \log ^2(c (d+e x)) \, dx=2 e \left (- \frac {d \log {\left (d + e x \right )}}{e^{2}} + \frac {x}{e}\right ) - 2 x \log {\left (c \left (d + e x\right ) \right )} + \frac {\left (d + e x\right ) \log {\left (c \left (d + e x\right ) \right )}^{2}}{e} \]

[In]

integrate(ln(c*(e*x+d))**2,x)

[Out]

2*e*(-d*log(d + e*x)/e**2 + x/e) - 2*x*log(c*(d + e*x)) + (d + e*x)*log(c*(d + e*x))**2/e

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.73 \[ \int \log ^2(c (d+e x)) \, dx=-2 \, e {\left (\frac {x}{e} - \frac {d \log \left (e x + d\right )}{e^{2}}\right )} \log \left ({\left (e x + d\right )} c\right ) + x \log \left ({\left (e x + d\right )} c\right )^{2} - \frac {d \log \left (e x + d\right )^{2} - 2 \, e x + 2 \, d \log \left (e x + d\right )}{e} \]

[In]

integrate(log(c*(e*x+d))^2,x, algorithm="maxima")

[Out]

-2*e*(x/e - d*log(e*x + d)/e^2)*log((e*x + d)*c) + x*log((e*x + d)*c)^2 - (d*log(e*x + d)^2 - 2*e*x + 2*d*log(
e*x + d))/e

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.17 \[ \int \log ^2(c (d+e x)) \, dx=\frac {{\left (e x + d\right )} \log \left ({\left (e x + d\right )} c\right )^{2}}{e} - \frac {2 \, {\left (e x + d\right )} \log \left ({\left (e x + d\right )} c\right )}{e} + \frac {2 \, {\left (e x + d\right )}}{e} \]

[In]

integrate(log(c*(e*x+d))^2,x, algorithm="giac")

[Out]

(e*x + d)*log((e*x + d)*c)^2/e - 2*(e*x + d)*log((e*x + d)*c)/e + 2*(e*x + d)/e

Mupad [B] (verification not implemented)

Time = 1.39 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.39 \[ \int \log ^2(c (d+e x)) \, dx=2\,x-2\,x\,\ln \left (c\,d+c\,e\,x\right )+x\,{\ln \left (c\,d+c\,e\,x\right )}^2+\frac {d\,{\ln \left (c\,d+c\,e\,x\right )}^2}{e}-\frac {2\,d\,\ln \left (d+e\,x\right )}{e} \]

[In]

int(log(c*(d + e*x))^2,x)

[Out]

2*x - 2*x*log(c*d + c*e*x) + x*log(c*d + c*e*x)^2 + (d*log(c*d + c*e*x)^2)/e - (2*d*log(d + e*x))/e